﻿using System;
using System.Web.Security;
using Lbb.Dynamic;
using System.Collections.Generic;

namespace Lbb.User
{
    /// <summary>
    /// 用户事件参数
    /// </summary>
    /// <author>Chiron</author>
    public class UserEventArgs : EventArgs
    {
        /// <summary>
        /// 用户
        /// </summary>
        public MemberUser User { get; set; }

        /// <summary>
        /// 拓展参数
        /// </summary>
        public Dictionary<string, object> ExtArgDict
        {
            get { return _ExtArgDict; }
            set
            {
                if (value == null) return;
                _ExtArgDict = value;
                _ExtArgs = null;
            }
        }
        private Dictionary<string, object> _ExtArgDict = new Dictionary<string, object>();

        /// <summary>
        /// 拓展参数
        /// </summary>
        public dynamic ExtArgs { get { return _ExtArgs ?? (_ExtArgs = new DynamicDictionary(_ExtArgDict)); } }
        private DynamicDictionary _ExtArgs;

        /// <summary>
        /// 取得操作
        /// </summary>
        public bool Cancel { get; set; }
    }
}
